package com.zhijian.medical.service;


import com.zhijian.medical.entity.po.AssessmentPaperQuestion;
import com.zhijian.medical.entity.vo.request.AssessmentPaperQuestionSearchVo;
import com.zhijian.medical.entity.vo.response.AssessmentPaperQuestionVo;
import com.zhijian.medical.util.Page;

import java.util.List;

/**
 * 考核-试卷生成的题目表 业务处理层
 *
 * @author HCG
 * @version 1.0
 * @date 2023-02-01 10:35:40
 */
public interface AssessmentPaperQuestionService {

    /**
     * 主键查询
     *
     * @param id
     * @return
     */
    AssessmentPaperQuestion selectById(Long id);

    /**
     * 主键查询vo
     *
     * @param id
     * @return
     */
    AssessmentPaperQuestionVo selectVoById(Long id);

    /**
     * 按照主键删除
     *
     * @param id
     */
    void deleteById(Long id);

    /**
     * 根据考核id进行删除
     *
     * @param assessmentId
     */
    void deleteByAssessmentId(Long assessmentId);

    /**
     * 新增
     *
     * @param assessmentPaperQuestion
     * @return
     */
    Long insert(AssessmentPaperQuestion assessmentPaperQuestion);

    /**
     * 更改
     *
     * @param assessmentPaperQuestion
     * @return
     */
    boolean update(AssessmentPaperQuestion assessmentPaperQuestion);

    /**
     * 动态修改
     *
     * @param record
     * @return
     */
    boolean updateByPrimaryKeySelective(AssessmentPaperQuestion record);

    /**
     * 总数
     *
     * @param assessmentPaperQuestionSearchVo
     * @return
     */
    Integer count(AssessmentPaperQuestionSearchVo assessmentPaperQuestionSearchVo);

    /**
     * 列表
     *
     * @param assessmentPaperQuestionSearchVo
     * @return
     */
    List<AssessmentPaperQuestionVo> selectList(AssessmentPaperQuestionSearchVo assessmentPaperQuestionSearchVo);

    /**
     * 分页查询
     *
     * @param assessmentPaperQuestionSearchVo
     * @return
     */
    Page<AssessmentPaperQuestionVo> selectPage(AssessmentPaperQuestionSearchVo assessmentPaperQuestionSearchVo);

    /**
     * 批量新增数据（MyBatis原生foreach方法）
     *
     * @param entities 实例对象列表
     * @return 影响行数
     */
    boolean insertBatch(List<AssessmentPaperQuestion> entities);
}